/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 停车记录表新增 POST /api/parkingRecord/add */
export async function addUsingPost({
  body,
  options,
}: {
  body: API.tingchejilubiaochuangjiancanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/parkingRecord/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 停车记录表删除 POST /api/parkingRecord/del */
export async function delUsingPost({
  body,
  options,
}: {
  body: API.IDcanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/parkingRecord/del', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 停车记录表详情 GET /api/parkingRecord/detail */
export async function detailUsingGet2({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.detailUsingGET2Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResulttingchejilubiaoxiangqingVo>(
    '/api/parkingRecord/detail',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 停车记录表编辑 POST /api/parkingRecord/edit */
export async function editUsingPost({
  body,
  options,
}: {
  body: API.tingchejilubiaogengxincanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/parkingRecord/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 停车记录表列表 GET /api/parkingRecord/list */
export async function listUsingGet2({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listUsingGET2Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultPageResulttingchejilubiaoliebiaoVo>(
    '/api/parkingRecord/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 用户停车 POST /api/parkingRecord/stop */
export async function stopUsingPost({
  body,
  options,
}: {
  body: API.yonghutingche;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/parkingRecord/stop', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
